﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using GtsServer.Manage.Controller;
using GtsServer.Model;
using GtsServer.Common;

namespace GtsServer.Manage.IISPage.Ajax
{
    /// <summary>
    /// szfOrderManage 的摘要说明
    /// </summary>
    public class szfOrderManage : IHttpHandler
    {
        szfOrderManageCotroller Controller = new szfOrderManageCotroller();
        public void ProcessRequest(HttpContext context)
        {
            string type = string.Empty;
            if (context.Request["action"] != null)
            {
                type = context.Request["action"];

                switch (type)
                {
                    case "Select":
                        GetListByIMSI(context);
                        break;
                    default:
                        break;
                }
            }
        }
        private void GetListByIMSI(HttpContext context)
        {
            int pageIndex = Convert.ToInt32(context.Request["pageIndex"]);
            int pageSize = Convert.ToInt32(context.Request["pageSize"]);
            int count = 0;
            string sysAccount = context.Request["sysAccount"];
            int txtID = Convert.ToInt32(context.Request["typeID"]);
            List<OrderSZFDetailMouldShow> list = Controller.GetListBysysAccount(pageIndex, pageSize, out count, txtID, sysAccount);
            string json = JsonHelper.ListToJson<OrderSZFDetailMouldShow>(list,count.ToString());
            context.Response.Write(json);
        }
        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}